package com.xinlong.dao;

import com.xinlong.entity.Permission;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

public interface IpermissionsDao {

    @Select("select * from Permission where id in (select permissionid from role_permission where roleid=#{id})")
     List<Permission> findbyroleid(String id);

    @Select("select * from Permission")
    List<Permission> finAll();

    @Insert("insert into Permission values(null,#{permissionName},#{url})")
    void save(Permission permission);
}
